<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Section A.16.&nbsp; Chapter 16</title>
<link rel="STYLESHEET" type="text/css" href="images/style.css">
<link rel="STYLESHEET" type="text/css" href="images/docsafari.css">
<script type="text/javascript"><!--
google_ad_client = "pub-0203281046321155";
google_alternate_ad_url = "http://www.bookhtml.com/adbrite.htm";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="4867465545";
google_color_border = "FFFFFF";
google_color_link = "0000FF";
google_color_bg = "FFFFFF";
google_color_text = "000000";
google_color_url = "0000FF";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-APP-A-SECT-15.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-APP-A-SECT-17.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><TD valign="top"><a name="learnphpmysql-APP-A-SECT-16"></a>
<h3 id="631450-803" class="docSection1Title">A.16. Chapter 16</h3>
<dl class="docList">
<dt><br><p><span class="docPubcolor"><span class="docEmphStrong">Solution to Question 16-1</span></span></p></dt>
<dd><p class="docList">To change the blog name to "PHP and MySQL Zone," modify the <span class="docEmphasis">config.php</span> as follows:</p>
<pre>
&lt;?php
  // put full path to Smarty.class.php
  require('/usr/share/php/Smarty/Smarty.class.php');
  $smarty = new Smarty();
  $smarty-&gt;template_dir = '/home/www/htmlkb/smarty/templates';
  $smarty-&gt;compile_dir = '/home/www/htmlkb/smarty/templates_c';
  $smarty-&gt;cache_dir = '/home/www/htmlkb/smarty/cache';
  $smarty-&gt;config_dir = '/home/www/htmlkb/smarty/configs';
  $blog_title="PHP and MySQL Zone";
?&gt;
</pre><br>

</dd>

<dt><br><p><span class="docPubcolor"><span class="docEmphStrong">Solution to Question 16-2</span></span></p></dt>
<dd><p class="docList">From the MySQL client, execute the SQL query:</p>
<pre>
insert into categories values (NULL, 'Bugs');
</pre><br>

<p class="docList">You can also add the row using <tt>phpMyAdmin</tt>. Because the drop-down category list is created dynamically, this is the only change required to add a new category.</P>
</dd>

<dt><br><p><span class="docPubcolor"><span class="docEmphStrong">Solution to Question 16-3</span></span></P></dt>
<dd><p class="docList">Templates make it easy to keep your site organized. Changes made to the header and footer automatically apply to all pages. Also, editing the HTML is easier because there isn't any PHP code mixed in with it.</P></dd>
</dl>

</TD></TR></table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-APP-A-SECT-15.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-APP-A-SECT-17.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
</body></html>
